package 面试真题;

import java.util.Scanner;

/**
 * @author 帅小伙
 * @date 2022/1/22
 * @description 按位置输出  a - z   A-Z
 */
public class Demo02腾讯2017暑假实习生编程题 {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextLine()){
            solution(scanner.nextLine());
        }
    }

    public static void solution(String s) {
        char[] chars = s.toCharArray();

        for (int i = 0; i < chars.length; i++) {
            if (chars[i] >= 'a' && chars[i] <= 'z') {
                System.out.print(chars[i]);
            }
        }

        for (int i = 0; i < chars.length; i++) {
            if (chars[i] >= 'A' && chars[i] <= 'Z') {
                System.out.print(chars[i]);
            }
        }
    }
}
